home *** CD-ROM | disk | FTP | other *** search
/ Champak 145 / (Vol 145) Dec 21 2011.iso / Games / hearts.swf / scripts / DefineSprite_638 / frame_1 / DoAction_15.as < prev    next >
Encoding:
Text File  |  2011-12-21  |  1.5 KB  |  61 lines

  1. this.startGame = function(what)
  2. {
  3.    var t = this;
  4.    t.gameType = what;
  5.    t.resetVars();
  6.    t.gamePlay = false;
  7.    t.pauseFunc(false);
  8.    t.launcher.gotoAndStop("show");
  9.    t.gameDisplay.quitBtn.enabled = true;
  10.    var i = 0;
  11.    while(i < t.numLives)
  12.    {
  13.       t.gameDisplay.attachMovie("heart","h" + i,i);
  14.       var n = t.gameDisplay["h" + i];
  15.       n._x = i * 33 + 22;
  16.       n._y = 427;
  17.       i++;
  18.    }
  19.    var i = 0;
  20.    while(i < 12)
  21.    {
  22.       t.gameDisplay.attachMovie("pu","p" + (i + 1),i + 100);
  23.       var n = t.gameDisplay["p" + (i + 1)];
  24.       n._x = i * 40 + 22;
  25.       n._y = 460;
  26.       n._xscale = n._yscale = 120;
  27.       n.graphic.gotoAndStop(i + 1);
  28.       n._alpha = t.initPUAlpha;
  29.       i++;
  30.    }
  31.    if(what == "real")
  32.    {
  33.       var n = 3;
  34.       while(n > 0)
  35.       {
  36.          t.createFly();
  37.          n--;
  38.       }
  39.    }
  40.    t.launcher._y = 150;
  41.    t.launcher.cupid.body.arms.anim.gotoAndStop("done");
  42.    t.launcher.cupid.body._rotation = 0;
  43.    t.launcher.cupid.body.belt._rotation = 0;
  44.    t.launcher.cupid.head._rotation = 0;
  45.    t.launcher.cupid.body.arms._rotation = 0;
  46.    t.launcher.cupid.body.arms2._rotation = 0;
  47.    t.launcher.cupid.legs._rotation = 0;
  48.    if(what == "real")
  49.    {
  50.       t.gameDisplay.countDown.gotoAndPlay("count");
  51.       _quality = t.inGameQuality;
  52.    }
  53.    else
  54.    {
  55.       t.gamePlay = true;
  56.    }
  57.    t.mainDisplay.gotoAndStop("blank");
  58.    t.mainDisplay.promptHelpMC.gotoAndStop("blank");
  59.    t.gameOver.gotoAndStop("blank");
  60. };
  61.